package com.tao.listen;

import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @ClassName HelloConsumer
 * @Author HETAO
 * @Date 2020/5/5 9:13
 */
@RabbitListener(queuesToDeclare = @Queue("hello"))
@Component
public class HelloConsumer {
    @RabbitHandler
    public void test(String msg) {
        System.out.println(msg);
    }

}
